package 设计模式.工厂模式.AbstractFactory;

/**
 * @description:
 * @author: asd
 * @time: 2022/11/18 1:52
 */
public class BlackManFactory extends AbstractHumanFactory{
    @Override
    public Man creatMan() {
        return new BlackMan();
    }

    @Override
    public Woman creatWoman() {
        return new BlackWoman();
    }
}
class BlackMan extends Man{

    @Override
    public void print() {
        System.out.println("黑人捏，小黑子，男");
    }
}
class BlackWoman extends Woman{

    @Override
    public void print() {
        System.out.println("黑人捏，小黑子,女");
    }
}
